<!DOCTYPE html>
<html>
<head>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
    <meta charset="UTF-8">
    <title>修改相机检校</title>
    {% include 'template/baseCss.volt' %}
    <link href="/css/vendor/add-drone.less" rel="stylesheet/less" type="text/css">
    <script src="/js/less.min.js"></script>
</head>
<body>
<main>
    <form name="upload" enctype="multipart/form-data" method="post" id="upload">
        <div class="title-bar">
            <label class="server-id">修改相机检校</label>
        </div>
        <div id="info-wrap">
            <table>
                <tr>
		            <th>相机id:</th>
		            <td><input type="text" value="{{ cameraCheck['camera_id'] }}" id="camera_id" name="camera_id"/></td>
		            <input type="hidden" value="{{ cameraCheck['id'] }}" name="id"/>
		        </tr>
		        <tr>
		            <th>镜头id:</th>
		            <td><input type="text" value="{{ cameraCheck['camera_lens_id'] }}" id="camera_lens_id" name="camera_lens_id"/></td>
		        </tr>
		        <tr>
		            <th>相机型号:</th>
		            <td><select name="cameraModel_id" id="cameraModel_id">
		                    <option value="">请选择</option>
		                    {% for id,name in cameraTypeList %}
		                        <option value="{{ id }}" {% if cameraCheck['cameraModel_id'] ==  id %}  selected = "selected"} {% endif %} >{{ name }}</option>
		                    {% endfor %}
		                </select></td>
		        </tr>
		        <tr>
                    <th>飞机编号:</th>
                    <td>
                        <input id="uas_serial_id" name="uas_serial_id" value="{{ uas_serial_id }}" type="text" onclick="clickChangePlane()">
                    </td>
                </tr>
		        <tr>
		            <th>检校结果是否合格:</th>
		            <td><input type="checkbox" value="1" name="qualified" {% if cameraCheck['qualified'] == 1 %}  checked="checked"} {% endif %}/></td>
		        </tr>
		        <tr>
		            <th>检校结果文件:</th>
		            <td><input type="file" value="" id="checkResult" name="checkResult" /></td>
		        </tr>
		            <input type="hidden" value="{{ cameraCheck['picture1_url'] }}" id="picture1_url" name="picture1_url"/>
		            <input type="hidden" value="{{ cameraCheck['picture2_url'] }}" id="picture2_url" name="picture2_url"/>
		            <input type="hidden" value="{{ cameraCheck['picture3_url'] }}" id="picture3_url" name="picture3_url"/>
		            <input type="hidden" value="{{ cameraCheck['check_project_url'] }}" id="checkProjectFile" name="checkProjectFile"/>
		            <input type="hidden" value="{{ cameraCheck['calibration_result_url'] }}" id="calibrationResultFile" name="calibrationResultFile"/>
		        
    </form>
		        <tr>
		            <th>检校项目文件:</th>
		            <td><input type="file" value="" id="projectFile" name="projectFile" /></td>
		        </tr>
		        <tr>
		            <th>高精度检校结果文件:</th>
		            <td><input type="file" value="" id="resultFile" name="resultFile" /></td>
		        </tr>
		        <tr>
		            <th>图片1:</th>
		            <td>{{ cameraCheck['picture1_url'] }}</td>
		        </tr>
		        <tr>
		            <th></th>
		            <td><input type="file" value="" id="file1" name="file1" /></td>
		        </tr>
		        <tr>	
		            <th>图片2:</th>
		            <td>{{ cameraCheck['picture2_url'] }}</td>
		        </tr>
		        <tr>
		            <th></th>
		            <td><input type="file" value="" id="file2" name="file2" /></td>
		        </tr>
		        <tr>
		            <th>图片3:</th>
		            <td>{{ cameraCheck['picture3_url'] }}</td>
		        </tr>
		        <tr>
		            <th></th>
		            <td><input type="file" value="" id="file3" name="file3" /></td>
		        </tr>
            </table>
            <div class="version-content" id="content"></div>
        </div>
        <p id="save-btn" class="button" style="visibility: visible">修改</p>
        <p id="reset-btn" class="button" style="visibility: visible">重置</p>
</main>
</body>

{% include 'template/baseJs.volt' %}
<script type="text/javascript" src="/third-part/wang-editor/wangEditor.min.js"></script>
<script src="/js/cos-js-sdk-v5.js"></script>
<script src="/js/vendor/upload-cos.js"></script>

<script>
	$(function () {
	    CosUpload.cosInit("/file/getCosInfo");
	    CosUpload.path = CosUpload.path + "cameracheck/";
	});
	
	$("#save-btn").click(function () {
	    CosUpload.path = CosUpload.path + "cameracheck/";
	    
	    var file = $("#file1")[0].files[0];
	    if (file) {
	        loadingProgressView.show();
	        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	            if (res.status === 0) {
	                console.log("上传成功");
	                loadingProgressView.remove();
	                
	                $("#picture1_url").val(res.url);
	                
	                var file = $("#file2")[0].files[0];
	                if (file) {
	                    loadingProgressView.show();
	                    CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                        if (res.status === 0) {
	                            console.log("上传成功");
	                            loadingProgressView.remove();
	                            
	                            $("#picture2_url").val(res.url);
	                            
	                            var file = $("#file3")[0].files[0];
	                            if (file) {
	                                loadingProgressView.show();
	                                CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                    if (res.status === 0) {
	                                        console.log("上传成功");
	                                        loadingProgressView.remove();
	                                        
	                                        $("#picture3_url").val(res.url);
	                                        
	                                        var file = $("#projectFile")[0].files[0];
	                                        if (file) {
	                                            loadingProgressView.show();
	                                            CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                                if (res.status === 0) {
	                                                    console.log("上传成功");
	                                                    loadingProgressView.remove();
	                                                    
	                                                    $("#checkProjectFile").val(res.url);
	                                                    
	                                                    var file = $("#resultFile")[0].files[0];
	                                                    if (file) {
	                                                        loadingProgressView.show();
	                                                        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                                            if (res.status === 0) {
	                                                                console.log("上传成功");
	                                                                loadingProgressView.remove();
	                                                                
	                                                                $("#calibrationResultFile").val(res.url);
	                                                                
	                                                                var form = document.getElementById('upload'), 
	                                                        		formData = new FormData(form); 
	                                                        		$.ajax({ 
	                                                        			url:"/factory/editCameraCalibrationDo", 
	                                                        			type:"post", 
	                                                        			data:formData, 
	                                                        			processData:false, 
	                                                        			contentType:false, 
	                                                        			success:function(res){ 
	                                                        				if(res){ 
	                                                        					if(res.status!=0)
	                                                        						FAlert("修改失败" + res.data, function (result) {
	                                                        	
	                                                        						}) 
	                                                        					else{
	                                                        						FAlert("修改成功", function (result) {
	                                                        							window.location.href = "/factory/cameraCalibration";
	                                                        						})
	                                                        					}
	                                                        				} 
	                                                        			}, 
	                                                        			error:function(err){ 
	                                                        				alert("添加失败",err); 
	                                                        			}
	                                                        		});
	                                                            }else {
	                                                                loadingProgressView.remove();
	                                                                FAlert("上传文件失败: " + res.error);
	                                                            }
	                                                        }, function (progress) {
	                                                            console.log(progress);
	                                                            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                                        });
	                                                    }else{
	                                                    	var form = document.getElementById('upload'), 
	                                                		formData = new FormData(form); 
	                                                		$.ajax({ 
	                                                			url:"/factory/editCameraCalibrationDo", 
	                                                			type:"post", 
	                                                			data:formData, 
	                                                			processData:false, 
	                                                			contentType:false, 
	                                                			success:function(res){ 
	                                                				if(res){ 
	                                                					if(res.status!=0)
	                                                						FAlert("修改失败" + res.data, function (result) {
	                                                	
	                                                						}) 
	                                                					else{
	                                                						FAlert("修改成功", function (result) {
	                                                							window.location.href = "/factory/cameraCalibration";
	                                                						})
	                                                					}
	                                                				} 
	                                                			}, 
	                                                			error:function(err){ 
	                                                				alert("添加失败",err); 
	                                                			}
	                                                		});
	                                                    }
	                                                }else {
	                                                    loadingProgressView.remove();
	                                                    FAlert("上传文件失败: " + res.error);
	                                                }
	                                            }, function (progress) {
	                                                console.log(progress);
	                                                loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                            });
	                                        }else{
	                                        	var file = $("#resultFile")[0].files[0];
	                                            if (file) {
	                                                loadingProgressView.show();
	                                                CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                                    if (res.status === 0) {
	                                                        console.log("上传成功");
	                                                        loadingProgressView.remove();
	                                                        
	                                                        $("#calibrationResultFile").val(res.url);
	                                                        
	                                                        var form = document.getElementById('upload'), 
	                                                		formData = new FormData(form); 
	                                                		$.ajax({ 
	                                                			url:"/factory/editCameraCalibrationDo", 
	                                                			type:"post", 
	                                                			data:formData, 
	                                                			processData:false, 
	                                                			contentType:false, 
	                                                			success:function(res){ 
	                                                				if(res){ 
	                                                					if(res.status!=0)
	                                                						FAlert("修改失败" + res.data, function (result) {
	                                                	
	                                                						}) 
	                                                					else{
	                                                						FAlert("修改成功", function (result) {
	                                                							window.location.href = "/factory/cameraCalibration";
	                                                						})
	                                                					}
	                                                				} 
	                                                			}, 
	                                                			error:function(err){ 
	                                                				alert("添加失败",err); 
	                                                			}
	                                                		});
	                                                    }else {
	                                                        loadingProgressView.remove();
	                                                        FAlert("上传文件失败: " + res.error);
	                                                    }
	                                                }, function (progress) {
	                                                    console.log(progress);
	                                                    loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                                });
	                                            }else{
	                                            	var form = document.getElementById('upload'), 
	                                        		formData = new FormData(form); 
	                                        		$.ajax({ 
	                                        			url:"/factory/editCameraCalibrationDo", 
	                                        			type:"post", 
	                                        			data:formData, 
	                                        			processData:false, 
	                                        			contentType:false, 
	                                        			success:function(res){ 
	                                        				if(res){ 
	                                        					if(res.status!=0)
	                                        						FAlert("修改失败" + res.data, function (result) {
	                                        	
	                                        						}) 
	                                        					else{
	                                        						FAlert("修改成功", function (result) {
	                                        							window.location.href = "/factory/cameraCalibration";
	                                        						})
	                                        					}
	                                        				} 
	                                        			}, 
	                                        			error:function(err){ 
	                                        				alert("添加失败",err); 
	                                        			}
	                                        		});
	                                            }
	                                        }
	                                    }else {
	                                        loadingProgressView.remove();
	                                        FAlert("上传文件失败: " + res.error);
	                                    }
	                                }, function (progress) {
	                                    console.log(progress);
	                                    loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                });
	                            }else{
	                            	var file = $("#projectFile")[0].files[0];
	                                if (file) {
	                                    loadingProgressView.show();
	                                    CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                        if (res.status === 0) {
	                                            console.log("上传成功");
	                                            loadingProgressView.remove();
	                                            
	                                            $("#checkProjectFile").val(res.url);
	                                            
	                                            var file = $("#resultFile")[0].files[0];
	                                            if (file) {
	                                                loadingProgressView.show();
	                                                CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                                    if (res.status === 0) {
	                                                        console.log("上传成功");
	                                                        loadingProgressView.remove();
	                                                        
	                                                        $("#calibrationResultFile").val(res.url);
	                                                        
	                                                        var form = document.getElementById('upload'), 
	                                                		formData = new FormData(form); 
	                                                		$.ajax({ 
	                                                			url:"/factory/editCameraCalibrationDo", 
	                                                			type:"post", 
	                                                			data:formData, 
	                                                			processData:false, 
	                                                			contentType:false, 
	                                                			success:function(res){ 
	                                                				if(res){ 
	                                                					if(res.status!=0)
	                                                						FAlert("修改失败" + res.data, function (result) {
	                                                	
	                                                						}) 
	                                                					else{
	                                                						FAlert("修改成功", function (result) {
	                                                							window.location.href = "/factory/cameraCalibration";
	                                                						})
	                                                					}
	                                                				} 
	                                                			}, 
	                                                			error:function(err){ 
	                                                				alert("添加失败",err); 
	                                                			}
	                                                		});
	                                                    }else {
	                                                        loadingProgressView.remove();
	                                                        FAlert("上传文件失败: " + res.error);
	                                                    }
	                                                }, function (progress) {
	                                                    console.log(progress);
	                                                    loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                                });
	                                            }else{
	                                            	var form = document.getElementById('upload'), 
	                                        		formData = new FormData(form); 
	                                        		$.ajax({ 
	                                        			url:"/factory/editCameraCalibrationDo", 
	                                        			type:"post", 
	                                        			data:formData, 
	                                        			processData:false, 
	                                        			contentType:false, 
	                                        			success:function(res){ 
	                                        				if(res){ 
	                                        					if(res.status!=0)
	                                        						FAlert("修改失败" + res.data, function (result) {
	                                        	
	                                        						}) 
	                                        					else{
	                                        						FAlert("修改成功", function (result) {
	                                        							window.location.href = "/factory/cameraCalibration";
	                                        						})
	                                        					}
	                                        				} 
	                                        			}, 
	                                        			error:function(err){ 
	                                        				alert("添加失败",err); 
	                                        			}
	                                        		});
	                                            }
	                                        }else {
	                                            loadingProgressView.remove();
	                                            FAlert("上传文件失败: " + res.error);
	                                        }
	                                    }, function (progress) {
	                                        console.log(progress);
	                                        loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                    });
	                                }else{
	                                	var file = $("#resultFile")[0].files[0];
	                                    if (file) {
	                                        loadingProgressView.show();
	                                        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                            if (res.status === 0) {
	                                                console.log("上传成功");
	                                                loadingProgressView.remove();
	                                                
	                                                $("#calibrationResultFile").val(res.url);
	                                                
	                                                var form = document.getElementById('upload'), 
	                                        		formData = new FormData(form); 
	                                        		$.ajax({ 
	                                        			url:"/factory/editCameraCalibrationDo", 
	                                        			type:"post", 
	                                        			data:formData, 
	                                        			processData:false, 
	                                        			contentType:false, 
	                                        			success:function(res){ 
	                                        				if(res){ 
	                                        					if(res.status!=0)
	                                        						FAlert("修改失败" + res.data, function (result) {
	                                        	
	                                        						}) 
	                                        					else{
	                                        						FAlert("修改成功", function (result) {
	                                        							window.location.href = "/factory/cameraCalibration";
	                                        						})
	                                        					}
	                                        				} 
	                                        			}, 
	                                        			error:function(err){ 
	                                        				alert("添加失败",err); 
	                                        			}
	                                        		});
	                                            }else {
	                                                loadingProgressView.remove();
	                                                FAlert("上传文件失败: " + res.error);
	                                            }
	                                        }, function (progress) {
	                                            console.log(progress);
	                                            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                        });
	                                    }else{
	                                    	var form = document.getElementById('upload'), 
	                                		formData = new FormData(form); 
	                                		$.ajax({ 
	                                			url:"/factory/editCameraCalibrationDo", 
	                                			type:"post", 
	                                			data:formData, 
	                                			processData:false, 
	                                			contentType:false, 
	                                			success:function(res){ 
	                                				if(res){ 
	                                					if(res.status!=0)
	                                						FAlert("修改失败" + res.data, function (result) {
	                                	
	                                						}) 
	                                					else{
	                                						FAlert("修改成功", function (result) {
	                                							window.location.href = "/factory/cameraCalibration";
	                                						})
	                                					}
	                                				} 
	                                			}, 
	                                			error:function(err){ 
	                                				alert("添加失败",err); 
	                                			}
	                                		});
	                                    }
	                                }
	                            }
	                        }else {
	                            loadingProgressView.remove();
	                            FAlert("上传文件失败: " + res.error);
	                        }
	                    }, function (progress) {
	                        console.log(progress);
	                        loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                    });
	                }else{
	                	var file = $("#file3")[0].files[0];
	                    if (file) {
	                        loadingProgressView.show();
	                        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                            if (res.status === 0) {
	                                console.log("上传成功");
	                                loadingProgressView.remove();
	                                
	                                $("#picture3_url").val(res.url);
	                                
	                                var file = $("#projectFile")[0].files[0];
	                                if (file) {
	                                    loadingProgressView.show();
	                                    CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                        if (res.status === 0) {
	                                            console.log("上传成功");
	                                            loadingProgressView.remove();
	                                            
	                                            $("#checkProjectFile").val(res.url);
	                                            
	                                            var file = $("#resultFile")[0].files[0];
	                                            if (file) {
	                                                loadingProgressView.show();
	                                                CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                                    if (res.status === 0) {
	                                                        console.log("上传成功");
	                                                        loadingProgressView.remove();
	                                                        
	                                                        $("#calibrationResultFile").val(res.url);
	                                                        
	                                                        var form = document.getElementById('upload'), 
	                                                		formData = new FormData(form); 
	                                                		$.ajax({ 
	                                                			url:"/factory/editCameraCalibrationDo", 
	                                                			type:"post", 
	                                                			data:formData, 
	                                                			processData:false, 
	                                                			contentType:false, 
	                                                			success:function(res){ 
	                                                				if(res){ 
	                                                					if(res.status!=0)
	                                                						FAlert("修改失败" + res.data, function (result) {
	                                                	
	                                                						}) 
	                                                					else{
	                                                						FAlert("修改成功", function (result) {
	                                                							window.location.href = "/factory/cameraCalibration";
	                                                						})
	                                                					}
	                                                				} 
	                                                			}, 
	                                                			error:function(err){ 
	                                                				alert("添加失败",err); 
	                                                			}
	                                                		});
	                                                    }else {
	                                                        loadingProgressView.remove();
	                                                        FAlert("上传文件失败: " + res.error);
	                                                    }
	                                                }, function (progress) {
	                                                    console.log(progress);
	                                                    loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                                });
	                                            }else{
	                                            	var form = document.getElementById('upload'), 
	                                        		formData = new FormData(form); 
	                                        		$.ajax({ 
	                                        			url:"/factory/editCameraCalibrationDo", 
	                                        			type:"post", 
	                                        			data:formData, 
	                                        			processData:false, 
	                                        			contentType:false, 
	                                        			success:function(res){ 
	                                        				if(res){ 
	                                        					if(res.status!=0)
	                                        						FAlert("修改失败" + res.data, function (result) {
	                                        	
	                                        						}) 
	                                        					else{
	                                        						FAlert("修改成功", function (result) {
	                                        							window.location.href = "/factory/cameraCalibration";
	                                        						})
	                                        					}
	                                        				} 
	                                        			}, 
	                                        			error:function(err){ 
	                                        				alert("添加失败",err); 
	                                        			}
	                                        		});
	                                            }
	                                        }else {
	                                            loadingProgressView.remove();
	                                            FAlert("上传文件失败: " + res.error);
	                                        }
	                                    }, function (progress) {
	                                        console.log(progress);
	                                        loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                    });
	                                }else{
	                                	var file = $("#resultFile")[0].files[0];
	                                    if (file) {
	                                        loadingProgressView.show();
	                                        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                            if (res.status === 0) {
	                                                console.log("上传成功");
	                                                loadingProgressView.remove();
	                                                
	                                                $("#calibrationResultFile").val(res.url);
	                                                
	                                                var form = document.getElementById('upload'), 
	                                        		formData = new FormData(form); 
	                                        		$.ajax({ 
	                                        			url:"/factory/editCameraCalibrationDo", 
	                                        			type:"post", 
	                                        			data:formData, 
	                                        			processData:false, 
	                                        			contentType:false, 
	                                        			success:function(res){ 
	                                        				if(res){ 
	                                        					if(res.status!=0)
	                                        						FAlert("修改失败" + res.data, function (result) {
	                                        	
	                                        						}) 
	                                        					else{
	                                        						FAlert("修改成功", function (result) {
	                                        							window.location.href = "/factory/cameraCalibration";
	                                        						})
	                                        					}
	                                        				} 
	                                        			}, 
	                                        			error:function(err){ 
	                                        				alert("添加失败",err); 
	                                        			}
	                                        		});
	                                            }else {
	                                                loadingProgressView.remove();
	                                                FAlert("上传文件失败: " + res.error);
	                                            }
	                                        }, function (progress) {
	                                            console.log(progress);
	                                            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                        });
	                                    }else{
	                                    	var form = document.getElementById('upload'), 
	                                		formData = new FormData(form); 
	                                		$.ajax({ 
	                                			url:"/factory/editCameraCalibrationDo", 
	                                			type:"post", 
	                                			data:formData, 
	                                			processData:false, 
	                                			contentType:false, 
	                                			success:function(res){ 
	                                				if(res){ 
	                                					if(res.status!=0)
	                                						FAlert("修改失败" + res.data, function (result) {
	                                	
	                                						}) 
	                                					else{
	                                						FAlert("修改成功", function (result) {
	                                							window.location.href = "/factory/cameraCalibration";
	                                						})
	                                					}
	                                				} 
	                                			}, 
	                                			error:function(err){ 
	                                				alert("添加失败",err); 
	                                			}
	                                		});
	                                    }
	                                }
	                            }else {
	                                loadingProgressView.remove();
	                                FAlert("上传文件失败: " + res.error);
	                            }
	                        }, function (progress) {
	                            console.log(progress);
	                            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                        });
	                    }else{
	                    	var file = $("#projectFile")[0].files[0];
	                        if (file) {
	                            loadingProgressView.show();
	                            CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                if (res.status === 0) {
	                                    console.log("上传成功");
	                                    loadingProgressView.remove();
	                                    
	                                    $("#checkProjectFile").val(res.url);
	                                    
	                                    var file = $("#resultFile")[0].files[0];
	                                    if (file) {
	                                        loadingProgressView.show();
	                                        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                            if (res.status === 0) {
	                                                console.log("上传成功");
	                                                loadingProgressView.remove();
	                                                
	                                                $("#calibrationResultFile").val(res.url);
	                                                
	                                                var form = document.getElementById('upload'), 
	                                        		formData = new FormData(form); 
	                                        		$.ajax({ 
	                                        			url:"/factory/editCameraCalibrationDo", 
	                                        			type:"post", 
	                                        			data:formData, 
	                                        			processData:false, 
	                                        			contentType:false, 
	                                        			success:function(res){ 
	                                        				if(res){ 
	                                        					if(res.status!=0)
	                                        						FAlert("修改失败" + res.data, function (result) {
	                                        	
	                                        						}) 
	                                        					else{
	                                        						FAlert("修改成功", function (result) {
	                                        							window.location.href = "/factory/cameraCalibration";
	                                        						})
	                                        					}
	                                        				} 
	                                        			}, 
	                                        			error:function(err){ 
	                                        				alert("添加失败",err); 
	                                        			}
	                                        		});
	                                            }else {
	                                                loadingProgressView.remove();
	                                                FAlert("上传文件失败: " + res.error);
	                                            }
	                                        }, function (progress) {
	                                            console.log(progress);
	                                            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                        });
	                                    }else{
	                                    	var form = document.getElementById('upload'), 
	                                		formData = new FormData(form); 
	                                		$.ajax({ 
	                                			url:"/factory/editCameraCalibrationDo", 
	                                			type:"post", 
	                                			data:formData, 
	                                			processData:false, 
	                                			contentType:false, 
	                                			success:function(res){ 
	                                				if(res){ 
	                                					if(res.status!=0)
	                                						FAlert("修改失败" + res.data, function (result) {
	                                	
	                                						}) 
	                                					else{
	                                						FAlert("修改成功", function (result) {
	                                							window.location.href = "/factory/cameraCalibration";
	                                						})
	                                					}
	                                				} 
	                                			}, 
	                                			error:function(err){ 
	                                				alert("添加失败",err); 
	                                			}
	                                		});
	                                    }
	                                }else {
	                                    loadingProgressView.remove();
	                                    FAlert("上传文件失败: " + res.error);
	                                }
	                            }, function (progress) {
	                                console.log(progress);
	                                loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                            });
	                        }else{
	                        	var file = $("#resultFile")[0].files[0];
	                            if (file) {
	                                loadingProgressView.show();
	                                CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                    if (res.status === 0) {
	                                        console.log("上传成功");
	                                        loadingProgressView.remove();
	                                        
	                                        $("#calibrationResultFile").val(res.url);
	                                        
	                                        var form = document.getElementById('upload'), 
	                                		formData = new FormData(form); 
	                                		$.ajax({ 
	                                			url:"/factory/editCameraCalibrationDo", 
	                                			type:"post", 
	                                			data:formData, 
	                                			processData:false, 
	                                			contentType:false, 
	                                			success:function(res){ 
	                                				if(res){ 
	                                					if(res.status!=0)
	                                						FAlert("修改失败" + res.data, function (result) {
	                                	
	                                						}) 
	                                					else{
	                                						FAlert("修改成功", function (result) {
	                                							window.location.href = "/factory/cameraCalibration";
	                                						})
	                                					}
	                                				} 
	                                			}, 
	                                			error:function(err){ 
	                                				alert("添加失败",err); 
	                                			}
	                                		});
	                                    }else {
	                                        loadingProgressView.remove();
	                                        FAlert("上传文件失败: " + res.error);
	                                    }
	                                }, function (progress) {
	                                    console.log(progress);
	                                    loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                });
	                            }else{
	                            	var form = document.getElementById('upload'), 
	                        		formData = new FormData(form); 
	                        		$.ajax({ 
	                        			url:"/factory/editCameraCalibrationDo", 
	                        			type:"post", 
	                        			data:formData, 
	                        			processData:false, 
	                        			contentType:false, 
	                        			success:function(res){ 
	                        				if(res){ 
	                        					if(res.status!=0)
	                        						FAlert("修改失败" + res.data, function (result) {
	                        	
	                        						}) 
	                        					else{
	                        						FAlert("修改成功", function (result) {
	                        							window.location.href = "/factory/cameraCalibration";
	                        						})
	                        					}
	                        				} 
	                        			}, 
	                        			error:function(err){ 
	                        				alert("添加失败",err); 
	                        			}
	                        		});
	                            }
	                        }
	                    }
	                }
	            }else {
	                FAlert("上传文件失败: " + res.error);
	            }
	        }, function (progress) {
	            console.log(progress);
	            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	        });
	    }else{
	    	var file = $("#file2")[0].files[0];
	        if (file) {
	            loadingProgressView.show();
	            CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                if (res.status === 0) {
	                    console.log("上传成功");
	                    loadingProgressView.remove();
	                    
	                    $("#picture2_url").val(res.url);
	                    
	                    var file = $("#file3")[0].files[0];
	                    if (file) {
	                        loadingProgressView.show();
	                        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                            if (res.status === 0) {
	                                console.log("上传成功");
	                                loadingProgressView.remove();
	                                
	                                $("#picture3_url").val(res.url);
	                                
	                                var file = $("#projectFile")[0].files[0];
	                                if (file) {
	                                    loadingProgressView.show();
	                                    CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                        if (res.status === 0) {
	                                            console.log("上传成功");
	                                            loadingProgressView.remove();
	                                            
	                                            $("#checkProjectFile").val(res.url);
	                                            
	                                            var file = $("#resultFile")[0].files[0];
	                                            if (file) {
	                                                loadingProgressView.show();
	                                                CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                                    if (res.status === 0) {
	                                                        console.log("上传成功");
	                                                        loadingProgressView.remove();
	                                                        
	                                                        $("#calibrationResultFile").val(res.url);
	                                                        
	                                                        var form = document.getElementById('upload'), 
	                                                		formData = new FormData(form); 
	                                                		$.ajax({ 
	                                                			url:"/factory/editCameraCalibrationDo", 
	                                                			type:"post", 
	                                                			data:formData, 
	                                                			processData:false, 
	                                                			contentType:false, 
	                                                			success:function(res){ 
	                                                				if(res){ 
	                                                					if(res.status!=0)
	                                                						FAlert("修改失败" + res.data, function (result) {
	                                                	
	                                                						}) 
	                                                					else{
	                                                						FAlert("修改成功", function (result) {
	                                                							window.location.href = "/factory/cameraCalibration";
	                                                						})
	                                                					}
	                                                				} 
	                                                			}, 
	                                                			error:function(err){ 
	                                                				alert("添加失败",err); 
	                                                			}
	                                                		});
	                                                    }else {
	                                                        loadingProgressView.remove();
	                                                        FAlert("上传文件失败: " + res.error);
	                                                    }
	                                                }, function (progress) {
	                                                    console.log(progress);
	                                                    loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                                });
	                                            }else{
	                                            	var form = document.getElementById('upload'), 
	                                        		formData = new FormData(form); 
	                                        		$.ajax({ 
	                                        			url:"/factory/editCameraCalibrationDo", 
	                                        			type:"post", 
	                                        			data:formData, 
	                                        			processData:false, 
	                                        			contentType:false, 
	                                        			success:function(res){ 
	                                        				if(res){ 
	                                        					if(res.status!=0)
	                                        						FAlert("修改失败" + res.data, function (result) {
	                                        	
	                                        						}) 
	                                        					else{
	                                        						FAlert("修改成功", function (result) {
	                                        							window.location.href = "/factory/cameraCalibration";
	                                        						})
	                                        					}
	                                        				} 
	                                        			}, 
	                                        			error:function(err){ 
	                                        				alert("添加失败",err); 
	                                        			}
	                                        		});
	                                            }
	                                        }else {
	                                            loadingProgressView.remove();
	                                            FAlert("上传文件失败: " + res.error);
	                                        }
	                                    }, function (progress) {
	                                        console.log(progress);
	                                        loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                    });
	                                }else{
	                                	var file = $("#resultFile")[0].files[0];
	                                    if (file) {
	                                        loadingProgressView.show();
	                                        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                            if (res.status === 0) {
	                                                console.log("上传成功");
	                                                loadingProgressView.remove();
	                                                
	                                                $("#calibrationResultFile").val(res.url);
	                                                
	                                                var form = document.getElementById('upload'), 
	                                        		formData = new FormData(form); 
	                                        		$.ajax({ 
	                                        			url:"/factory/editCameraCalibrationDo", 
	                                        			type:"post", 
	                                        			data:formData, 
	                                        			processData:false, 
	                                        			contentType:false, 
	                                        			success:function(res){ 
	                                        				if(res){ 
	                                        					if(res.status!=0)
	                                        						FAlert("修改失败" + res.data, function (result) {
	                                        	
	                                        						}) 
	                                        					else{
	                                        						FAlert("修改成功", function (result) {
	                                        							window.location.href = "/factory/cameraCalibration";
	                                        						})
	                                        					}
	                                        				} 
	                                        			}, 
	                                        			error:function(err){ 
	                                        				alert("添加失败",err); 
	                                        			}
	                                        		});
	                                            }else {
	                                                loadingProgressView.remove();
	                                                FAlert("上传文件失败: " + res.error);
	                                            }
	                                        }, function (progress) {
	                                            console.log(progress);
	                                            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                        });
	                                    }else{
	                                    	var form = document.getElementById('upload'), 
	                                		formData = new FormData(form); 
	                                		$.ajax({ 
	                                			url:"/factory/editCameraCalibrationDo", 
	                                			type:"post", 
	                                			data:formData, 
	                                			processData:false, 
	                                			contentType:false, 
	                                			success:function(res){ 
	                                				if(res){ 
	                                					if(res.status!=0)
	                                						FAlert("修改失败" + res.data, function (result) {
	                                	
	                                						}) 
	                                					else{
	                                						FAlert("修改成功", function (result) {
	                                							window.location.href = "/factory/cameraCalibration";
	                                						})
	                                					}
	                                				} 
	                                			}, 
	                                			error:function(err){ 
	                                				alert("添加失败",err); 
	                                			}
	                                		});
	                                    }
	                                }
	                            }else {
	                                loadingProgressView.remove();
	                                FAlert("上传文件失败: " + res.error);
	                            }
	                        }, function (progress) {
	                            console.log(progress);
	                            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                        });
	                    }else{
	                    	var file = $("#projectFile")[0].files[0];
	                        if (file) {
	                            loadingProgressView.show();
	                            CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                if (res.status === 0) {
	                                    console.log("上传成功");
	                                    loadingProgressView.remove();
	                                    
	                                    $("#checkProjectFile").val(res.url);
	                                    
	                                    var file = $("#resultFile")[0].files[0];
	                                    if (file) {
	                                        loadingProgressView.show();
	                                        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                            if (res.status === 0) {
	                                                console.log("上传成功");
	                                                loadingProgressView.remove();
	                                                
	                                                $("#calibrationResultFile").val(res.url);
	                                                
	                                                var form = document.getElementById('upload'), 
	                                        		formData = new FormData(form); 
	                                        		$.ajax({ 
	                                        			url:"/factory/editCameraCalibrationDo", 
	                                        			type:"post", 
	                                        			data:formData, 
	                                        			processData:false, 
	                                        			contentType:false, 
	                                        			success:function(res){ 
	                                        				if(res){ 
	                                        					if(res.status!=0)
	                                        						FAlert("修改失败" + res.data, function (result) {
	                                        	
	                                        						}) 
	                                        					else{
	                                        						FAlert("修改成功", function (result) {
	                                        							window.location.href = "/factory/cameraCalibration";
	                                        						})
	                                        					}
	                                        				} 
	                                        			}, 
	                                        			error:function(err){ 
	                                        				alert("添加失败",err); 
	                                        			}
	                                        		});
	                                            }else {
	                                                loadingProgressView.remove();
	                                                FAlert("上传文件失败: " + res.error);
	                                            }
	                                        }, function (progress) {
	                                            console.log(progress);
	                                            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                        });
	                                    }else{
	                                    	var form = document.getElementById('upload'), 
	                                		formData = new FormData(form); 
	                                		$.ajax({ 
	                                			url:"/factory/editCameraCalibrationDo", 
	                                			type:"post", 
	                                			data:formData, 
	                                			processData:false, 
	                                			contentType:false, 
	                                			success:function(res){ 
	                                				if(res){ 
	                                					if(res.status!=0)
	                                						FAlert("修改失败" + res.data, function (result) {
	                                	
	                                						}) 
	                                					else{
	                                						FAlert("修改成功", function (result) {
	                                							window.location.href = "/factory/cameraCalibration";
	                                						})
	                                					}
	                                				} 
	                                			}, 
	                                			error:function(err){ 
	                                				alert("添加失败",err); 
	                                			}
	                                		});
	                                    }
	                                }else {
	                                    loadingProgressView.remove();
	                                    FAlert("上传文件失败: " + res.error);
	                                }
	                            }, function (progress) {
	                                console.log(progress);
	                                loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                            });
	                        }else{
	                        	var file = $("#resultFile")[0].files[0];
	                            if (file) {
	                                loadingProgressView.show();
	                                CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                    if (res.status === 0) {
	                                        console.log("上传成功");
	                                        loadingProgressView.remove();
	                                        
	                                        $("#calibrationResultFile").val(res.url);
	                                        
	                                        var form = document.getElementById('upload'), 
	                                		formData = new FormData(form); 
	                                		$.ajax({ 
	                                			url:"/factory/editCameraCalibrationDo", 
	                                			type:"post", 
	                                			data:formData, 
	                                			processData:false, 
	                                			contentType:false, 
	                                			success:function(res){ 
	                                				if(res){ 
	                                					if(res.status!=0)
	                                						FAlert("修改失败" + res.data, function (result) {
	                                	
	                                						}) 
	                                					else{
	                                						FAlert("修改成功", function (result) {
	                                							window.location.href = "/factory/cameraCalibration";
	                                						})
	                                					}
	                                				} 
	                                			}, 
	                                			error:function(err){ 
	                                				alert("添加失败",err); 
	                                			}
	                                		});
	                                    }else {
	                                        loadingProgressView.remove();
	                                        FAlert("上传文件失败: " + res.error);
	                                    }
	                                }, function (progress) {
	                                    console.log(progress);
	                                    loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                });
	                            }else{
	                            	var form = document.getElementById('upload'), 
	                        		formData = new FormData(form); 
	                        		$.ajax({ 
	                        			url:"/factory/editCameraCalibrationDo", 
	                        			type:"post", 
	                        			data:formData, 
	                        			processData:false, 
	                        			contentType:false, 
	                        			success:function(res){ 
	                        				if(res){ 
	                        					if(res.status!=0)
	                        						FAlert("修改失败" + res.data, function (result) {
	                        	
	                        						}) 
	                        					else{
	                        						FAlert("修改成功", function (result) {
	                        							window.location.href = "/factory/cameraCalibration";
	                        						})
	                        					}
	                        				} 
	                        			}, 
	                        			error:function(err){ 
	                        				alert("添加失败",err); 
	                        			}
	                        		});
	                            }
	                        }
	                    }
	                }else {
	                    loadingProgressView.remove();
	                    FAlert("上传文件失败: " + res.error);
	                }
	            }, function (progress) {
	                console.log(progress);
	                loadingProgressView.setProgress(progress * 0.8 + 0.2);
	            });
	        }else{
	        	var file = $("#file3")[0].files[0];
	            if (file) {
	                loadingProgressView.show();
	                CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                    if (res.status === 0) {
	                        console.log("上传成功");
	                        loadingProgressView.remove();
	                        
	                        $("#picture3_url").val(res.url);
	                        
	                        var file = $("#projectFile")[0].files[0];
	                        if (file) {
	                            loadingProgressView.show();
	                            CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                if (res.status === 0) {
	                                    console.log("上传成功");
	                                    loadingProgressView.remove();
	                                    
	                                    $("#checkProjectFile").val(res.url);
	                                    
	                                    var file = $("#resultFile")[0].files[0];
	                                    if (file) {
	                                        loadingProgressView.show();
	                                        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                            if (res.status === 0) {
	                                                console.log("上传成功");
	                                                loadingProgressView.remove();
	                                                
	                                                $("#calibrationResultFile").val(res.url);
	                                                
	                                                var form = document.getElementById('upload'), 
	                                        		formData = new FormData(form); 
	                                        		$.ajax({ 
	                                        			url:"/factory/editCameraCalibrationDo", 
	                                        			type:"post", 
	                                        			data:formData, 
	                                        			processData:false, 
	                                        			contentType:false, 
	                                        			success:function(res){ 
	                                        				if(res){ 
	                                        					if(res.status!=0)
	                                        						FAlert("修改失败" + res.data, function (result) {
	                                        	
	                                        						}) 
	                                        					else{
	                                        						FAlert("修改成功", function (result) {
	                                        							window.location.href = "/factory/cameraCalibration";
	                                        						})
	                                        					}
	                                        				} 
	                                        			}, 
	                                        			error:function(err){ 
	                                        				alert("添加失败",err); 
	                                        			}
	                                        		});
	                                            }else {
	                                                loadingProgressView.remove();
	                                                FAlert("上传文件失败: " + res.error);
	                                            }
	                                        }, function (progress) {
	                                            console.log(progress);
	                                            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                        });
	                                    }else{
	                                    	var form = document.getElementById('upload'), 
	                                		formData = new FormData(form); 
	                                		$.ajax({ 
	                                			url:"/factory/editCameraCalibrationDo", 
	                                			type:"post", 
	                                			data:formData, 
	                                			processData:false, 
	                                			contentType:false, 
	                                			success:function(res){ 
	                                				if(res){ 
	                                					if(res.status!=0)
	                                						FAlert("修改失败" + res.data, function (result) {
	                                	
	                                						}) 
	                                					else{
	                                						FAlert("修改成功", function (result) {
	                                							window.location.href = "/factory/cameraCalibration";
	                                						})
	                                					}
	                                				} 
	                                			}, 
	                                			error:function(err){ 
	                                				alert("添加失败",err); 
	                                			}
	                                		});
	                                    }
	                                }else {
	                                    loadingProgressView.remove();
	                                    FAlert("上传文件失败: " + res.error);
	                                }
	                            }, function (progress) {
	                                console.log(progress);
	                                loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                            });
	                        }else{
	                        	var file = $("#resultFile")[0].files[0];
	                            if (file) {
	                                loadingProgressView.show();
	                                CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                    if (res.status === 0) {
	                                        console.log("上传成功");
	                                        loadingProgressView.remove();
	                                        
	                                        $("#calibrationResultFile").val(res.url);
	                                        
	                                        var form = document.getElementById('upload'), 
	                                		formData = new FormData(form); 
	                                		$.ajax({ 
	                                			url:"/factory/editCameraCalibrationDo", 
	                                			type:"post", 
	                                			data:formData, 
	                                			processData:false, 
	                                			contentType:false, 
	                                			success:function(res){ 
	                                				if(res){ 
	                                					if(res.status!=0)
	                                						FAlert("修改失败" + res.data, function (result) {
	                                	
	                                						}) 
	                                					else{
	                                						FAlert("修改成功", function (result) {
	                                							window.location.href = "/factory/cameraCalibration";
	                                						})
	                                					}
	                                				} 
	                                			}, 
	                                			error:function(err){ 
	                                				alert("添加失败",err); 
	                                			}
	                                		});
	                                    }else {
	                                        loadingProgressView.remove();
	                                        FAlert("上传文件失败: " + res.error);
	                                    }
	                                }, function (progress) {
	                                    console.log(progress);
	                                    loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                });
	                            }else{
	                            	var form = document.getElementById('upload'), 
	                        		formData = new FormData(form); 
	                        		$.ajax({ 
	                        			url:"/factory/editCameraCalibrationDo", 
	                        			type:"post", 
	                        			data:formData, 
	                        			processData:false, 
	                        			contentType:false, 
	                        			success:function(res){ 
	                        				if(res){ 
	                        					if(res.status!=0)
	                        						FAlert("修改失败" + res.data, function (result) {
	                        	
	                        						}) 
	                        					else{
	                        						FAlert("修改成功", function (result) {
	                        							window.location.href = "/factory/cameraCalibration";
	                        						})
	                        					}
	                        				} 
	                        			}, 
	                        			error:function(err){ 
	                        				alert("添加失败",err); 
	                        			}
	                        		});
	                            }
	                        }
	                    }else {
	                        loadingProgressView.remove();
	                        FAlert("上传文件失败: " + res.error);
	                    }
	                }, function (progress) {
	                    console.log(progress);
	                    loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                });
	            }else{
	            	var file = $("#projectFile")[0].files[0];
	                if (file) {
	                    loadingProgressView.show();
	                    CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                        if (res.status === 0) {
	                            console.log("上传成功");
	                            loadingProgressView.remove();
	                            
	                            $("#checkProjectFile").val(res.url);
	                            
	                            var file = $("#resultFile")[0].files[0];
	                            if (file) {
	                                loadingProgressView.show();
	                                CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                                    if (res.status === 0) {
	                                        console.log("上传成功");
	                                        loadingProgressView.remove();
	                                        
	                                        $("#calibrationResultFile").val(res.url);
	                                        
	                                        var form = document.getElementById('upload'), 
	                                		formData = new FormData(form); 
	                                		$.ajax({ 
	                                			url:"/factory/editCameraCalibrationDo", 
	                                			type:"post", 
	                                			data:formData, 
	                                			processData:false, 
	                                			contentType:false, 
	                                			success:function(res){ 
	                                				if(res){ 
	                                					if(res.status!=0)
	                                						FAlert("修改失败" + res.data, function (result) {
	                                	
	                                						}) 
	                                					else{
	                                						FAlert("修改成功", function (result) {
	                                							window.location.href = "/factory/cameraCalibration";
	                                						})
	                                					}
	                                				} 
	                                			}, 
	                                			error:function(err){ 
	                                				alert("添加失败",err); 
	                                			}
	                                		});
	                                    }else {
	                                        loadingProgressView.remove();
	                                        FAlert("上传文件失败: " + res.error);
	                                    }
	                                }, function (progress) {
	                                    console.log(progress);
	                                    loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                                });
	                            }else{
	                            	var form = document.getElementById('upload'), 
	                        		formData = new FormData(form); 
	                        		$.ajax({ 
	                        			url:"/factory/editCameraCalibrationDo", 
	                        			type:"post", 
	                        			data:formData, 
	                        			processData:false, 
	                        			contentType:false, 
	                        			success:function(res){ 
	                        				if(res){ 
	                        					if(res.status!=0)
	                        						FAlert("修改失败" + res.data, function (result) {
	                        	
	                        						}) 
	                        					else{
	                        						FAlert("修改成功", function (result) {
	                        							window.location.href = "/factory/cameraCalibration";
	                        						})
	                        					}
	                        				} 
	                        			}, 
	                        			error:function(err){ 
	                        				alert("添加失败",err); 
	                        			}
	                        		});
	                            }
	                        }else {
	                            loadingProgressView.remove();
	                            FAlert("上传文件失败: " + res.error);
	                        }
	                    }, function (progress) {
	                        console.log(progress);
	                        loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                    });
	                }else{
	                	var file = $("#resultFile")[0].files[0];
	                    if (file) {
	                        loadingProgressView.show();
	                        CosUpload.sliceUpload(file, file.name, "cameracheck", function (res) {
	                            if (res.status === 0) {
	                                console.log("上传成功");
	                                loadingProgressView.remove();
	                                
	                                $("#calibrationResultFile").val(res.url);
	                                
	                                var form = document.getElementById('upload'), 
	                        		formData = new FormData(form); 
	                        		$.ajax({ 
	                        			url:"/factory/editCameraCalibrationDo", 
	                        			type:"post", 
	                        			data:formData, 
	                        			processData:false, 
	                        			contentType:false, 
	                        			success:function(res){ 
	                        				if(res){ 
	                        					if(res.status!=0)
	                        						FAlert("修改失败" + res.data, function (result) {
	                        	
	                        						}) 
	                        					else{
	                        						FAlert("修改成功", function (result) {
	                        							window.location.href = "/factory/cameraCalibration";
	                        						})
	                        					}
	                        				} 
	                        			}, 
	                        			error:function(err){ 
	                        				alert("添加失败",err); 
	                        			}
	                        		});
	                            }else {
	                                loadingProgressView.remove();
	                                FAlert("上传文件失败: " + res.error);
	                            }
	                        }, function (progress) {
	                            console.log(progress);
	                            loadingProgressView.setProgress(progress * 0.8 + 0.2);
	                        });
	                    }else{
	                    	var form = document.getElementById('upload'), 
	                		formData = new FormData(form); 
	                		$.ajax({ 
	                			url:"/factory/editCameraCalibrationDo", 
	                			type:"post", 
	                			data:formData, 
	                			processData:false, 
	                			contentType:false, 
	                			success:function(res){ 
	                				if(res){ 
	                					if(res.status!=0)
	                						FAlert("修改失败" + res.data, function (result) {
	                	
	                						}) 
	                					else{
	                						FAlert("修改成功", function (result) {
	                							window.location.href = "/factory/cameraCalibration";
	                						})
	                					}
	                				} 
	                			}, 
	                			error:function(err){ 
	                				alert("添加失败",err); 
	                			}
	                		});
	                    }
	                }
	            }
	        }
	    }
	});
	
	function clickChangePlane(){
        $("body").append("<div id='page-mask-container' class='page-mask-container'>" +
                "<iframe class='center-vh' style='width: 80%; height: 90%; border: none;' src='/plane/list?isGet=true'>" +
                "</iframe></div>");
        cmpControlM.pageMaskContainerListenEvent();
    }
	
	function childrenCallBack(param) {
        var uid = param.replace("uid=", "");
        $("#page-mask-container").remove();

        $("#uas_serial_id").val(uid);
    }
	
    $("#reset-btn").click(function (){
        location.reload();
    });
</script>
</html>